#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int Startyear, Endyear, i = Startyear, n=0;
	scanf("[%d,%d]", &Startyear, &Endyear);
	while (i <= Endyear)
	{
		if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)
			n++;
		i++;
	}
	printf("years=%d", n);
}